<?php

namespace Zms\Exception;

use Exception;


/***
 * 注意:该类不继承Zms\Exception\BasicsException
 * @describe 用于最外层捕获输出内容,需要单独捕获PrintException
 * @user zlf <zms-pro@qq.com> 2025/3/14
 */
class PrintException extends Exception
{
    /**
     * @var mixed
     */
    private $data = null;

    /**
     * @param mixed $data
     */
    public function __construct($data)
    {
        $this->data = print_r($data, true);
        parent::__construct('打印输出', 0);
    }

    public function getData()
    {
        return $this->data;
    }
}